﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;

using Please_starve.Sprites;

namespace Please_starve
{
    public class Map
    {
        List<SpriteData> spriteDatas;

        public Map()
        {
            spriteDatas = new List<SpriteData>();

            SpriteData grass = new SpriteData(Sprite3DTypes.Grass, 4, new Vector3(-1, 0, -1));
            spriteDatas.Add(grass);

            SpriteData tree = new SpriteData(Sprite3DTypes.Tree, 1, new Vector3(0.5f, 0, 1), 3, true);
            spriteDatas.Add(tree);

            SpriteData tree2 = new SpriteData(Sprite3DTypes.Tree, 1, new Vector3(1, 0, 1), 15);
            spriteDatas.Add(tree2);
        }

        public void Update(GameTime gameTime)
        {
            foreach (SpriteData spriteData in spriteDatas)
            {
                spriteData.Update(gameTime);
            }
        }

        public void Draw(GraphicsDevice graphicsDevice, BasicEffect basicEffect)
        {
            foreach (SpriteData spriteData in spriteDatas)
            {
                spriteData.Draw(graphicsDevice, basicEffect);
            }
        }
    }
}
